
<template>
  <div class="recommend">
    <div class="recommend_list">
      <div class="list_item" v-for="item in list" :key="item.id">
        <div class="item_img">
          <img :src="item.img_url" alt>
        </div>
        <div class="item_content">
          <div class="item_box">
            <h3>{{item.name}}</h3>
            <p>{{item.place}}</p>
            <div class="item_content_footer">
              <span class="m_price">{{item.m_price}}</span>
              <span class="storng">元</span>
              <span class="price">门市价:{{item.price}}元</span>
              <span class="number">已售{{item.number}}</span>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="recommend_footer">
      <div class="recommend_footer_content">
        <span>查看全部团购</span>
        <span class="iconfont">&#xe601;</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeRecommend",
  props: {
    list: Array
  },
  data: function() {
    return {};
  }
};
</script>

<style scoped>
.recommend h1 {
  text-align: left;
  font-size: 0.32rem;
  padding: 0.28rem 0.2rem;
  font-weight: 400;
  color: #333;
}
.recommend_list {
  padding-left: 0.2rem;
}
.list_item {
  border-top: 0.02rem solid #ddd8ce;
  width: 100%;
  overflow: hidden;
  padding: 0.2rem 0rem 0.2rem 0rem;
}
.item_img {
  width: 1.8rem;
  height: 1.64rem;
  position: absolute;
}
.item_img img {
  width: 100%;
  height: 100%;
}
.item_content {
  text-align: left;
  margin-left: 2rem;
  height: 1.64rem;
}
.item_box {
  height: 100%;
}
.item_box h3 {
  padding-top: 0.05rem;
  margin-bottom: 0.12rem;
  font-size: 0.3rem;
  font-weight: 400;
  color: #333;
}
.item_box p {
  font-size: 0.24rem;
  height: 0.68rem;
  margin-bottom: 0.16rem;
  color: #666;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item_content_footer {
  width: 100%;
  overflow: hidden;
  margin-top: -0.16rem;
}
.item_content_footer span {
  float: left;
}
.item_content_footer span.m_price {
  color: #06c1ae;
  font-size: 0.4rem;
}
.item_content_footer span.storng {
  font-size: 0.2rem;
  color: #06c1ae;
  margin-top: 0.1rem;
  margin-right: 0.1rem;
}
.item_content_footer span.price {
  font-size: 0.24rem;
  position: relative;
  top: 0.08rem;
}
.item_content_footer span.number {
  float: right;
  font-size: 0.24rem;
  margin-right: 0.2rem;
}
.recommend_footer {
  height: 0.8rem;
  border-bottom: 0.04rem solid #ddd8ce;
  border-top: 0.02rem solid #ddd8ce;
}
.recommend_footer_content {
  width: 100%;
  height: 0.4rem;
  margin: 0.2rem 0rem 0.2rem 0.2rem;
}
.recommend_footer span {
  float: left;
  color: #06c1ae;
  font-size: 0.3rem;
  display: flex;
  align-items: center;
}
.recommend_footer span.iconfont {
  float: right;
  font-size: 0.4rem;
  padding-right: 0.4rem;
}
</style>
